package com.bjc.principle.builder.demo2;

/**
 * @program: DesignPattern
 * @description: 具体的建造者
 * @author: bjc
 * @create: 2020-12-16 21:53
 */
public class Worker extends Builder{

    private Product product;

    public Worker() {
        this.product = new Product();
    }

    Builder builderA(String msg) {
        product.setBuildA(msg);
        return this;
    }

    Builder builderB(String msg) {
        product.setBuildB(msg);
        return this;
    }

    Builder builderC(String msg) {
        product.setBuildC(msg);
        return this;
    }

    Builder builderD(String msg) {
        product.setBuildD(msg);
        return this;
    }

    Product getProduct() {
        return product;
    }
}
